﻿using System;

namespace SmartMathLibrary.Management.Monitoring
{
    /// <summary>
    /// Defines the priority of the process, which retrieves the current item to monitor.
    /// </summary>
    public enum MonitoringPriority
    {
        /// <summary>
        /// Operations are processed after all other non-idle operations are completed. 
        /// </summary>
        Background = 0,
        /// <summary>
        /// This is the typical application priority.
        /// </summary>
        Normal = 1,
        /// <summary>
        /// Operations are processed when the system is idle.
        /// </summary>
        SystemIdle = 2,
        /// <summary>
        /// Operations are processed when the application is idle.
        /// </summary>
        ApplicationIdle = 3
    }

    /// <summary>
    /// Provides methods for a class, which observes or monitors a special system item.
    /// </summary>
    public interface IMonitor
    {
        /// <summary>
        /// Gets or sets the message limit.
        /// </summary>
        /// <value>The message limit.</value>
        double MessageLimit { get; set; }

        /// <summary>
        /// Gets the monitoring priority.
        /// </summary>
        /// <value>The monitoring priority.</value>
        MonitoringPriority MonitoringPriority { get; }

        /// <summary>
        /// Gets or sets the sampling rate.
        /// </summary>
        /// <value>The sampling rate.</value>
        double SamplingRate { get; set; }

        /// <summary>
        /// Starts the monitoring.
        /// </summary>
        void StartMonitoring();

        /// <summary>
        /// Stops the monitoring.
        /// </summary>
        void StopMonitoring();
    }
}